Skip to content

Aggregating bounded min/max values has to not ignore null values - #8169

Closed
robert3005 wants to merge 1 commit into
developfrom
rk/fuzzer
Closed

Aggregating bounded min/max values has to not ignore null values#8169
robert3005 wants to merge 1 commit into
developfrom
rk/fuzzer

Conversation

@robert3005

@robert3005 robert3005 commented May 31, 2026

Copy link
Copy Markdown
Contributor

Propagating bounded min/max is not the same as propagating nulls. In the case of
bounded min/max we have to conclude that null value could have come from trying
to produce the bounded value which means that there's no valid bounded value while there's still valid values in the array

handle #8166

@robert3005 robert3005 added the changelog/fix A bug fix label May 31, 2026
@robert3005
robert3005 requested review from gatesn and onursatici May 31, 2026 23:28

@gatesn gatesn left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like a very odd behaviour for truncated min/max to me, just leaving a request changes so I can read thoroughly on Monday.

@codspeed-hq

codspeed-hq Bot commented May 31, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

⚠️ Unknown Walltime execution environment detected

Using the Walltime instrument on standard Hosted Runners will lead to inconsistent data.

For the most accurate results, we recommend using CodSpeed Macro Runners: bare-metal machines fine-tuned for performance measurement consistency.

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

⚡ 4 improved benchmarks
❌ 7 regressed benchmarks
✅ 1570 untouched benchmarks

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Simulation decompress_rd[f64, (10000, 0.01)] 108.7 µs 139.2 µs -21.94%
Simulation decompress_rd[f64, (10000, 0.1)] 109 µs 139.6 µs -21.9%
Simulation decompress_rd[f64, (10000, 0.0)] 108.7 µs 139.2 µs -21.88%
Simulation decompress_rd[f32, (100000, 0.0)] 496 µs 583.9 µs -15.06%
Simulation decompress_rd[f32, (10000, 0.1)] 78.1 µs 91.3 µs -14.48%
Simulation decompress_rd[f32, (10000, 0.01)] 78.1 µs 91.1 µs -14.25%
Simulation decompress_rd[f32, (10000, 0.0)] 78.5 µs 91.3 µs -13.96%
Simulation chunked_varbinview_opt_canonical_into[(1000, 10)] 206.8 µs 170.2 µs +21.45%
Simulation bitwise_not_vortex_buffer_mut[128] 215.3 ns 186.1 ns +15.67%
Simulation chunked_varbinview_into_canonical[(100, 100)] 307.1 µs 272.5 µs +12.71%
Simulation bitwise_not_vortex_buffer_mut[1024] 275.6 ns 246.4 ns +11.84%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing rk/fuzzer (fc8953a) with develop (35e4d72)

Open in CodSpeed

@robert3005

Copy link
Copy Markdown
Contributor Author

This comes from the fact that bounded min/max is not transitive if you exclude nulls. The problem we run into is when producing a bounded max returns null because the bound exceeds the limits we have defined which then is not included in the min/max of the file which then can lead to skipped values.

@robert3005

robert3005 commented Jun 1, 2026

Copy link
Copy Markdown
Contributor Author

talked to @joseph-isaacs. There's a simpler fix, when we overflow on max we store truncated_len + 1 field which would be bigger than any of the existing values this doesn't work, we need to increment

@joseph-isaacs

Copy link
Copy Markdown
Contributor

what is the counterexample?

@robert3005

Copy link
Copy Markdown
Contributor Author

take upper_bound([FF, FF, FF, 0], 2) then [FF, FF, FF] is not >= [FF, FF, FF, 0]

@joseph-isaacs

Copy link
Copy Markdown
Contributor

But 0xFF > 0xF?

@robert3005

Copy link
Copy Markdown
Contributor Author

yes but I don't follow

@joseph-isaacs

joseph-isaacs commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Okay we need to store a flag to specify MAX_VALUE, such that for x. x <= MAX_VALUE

@github-actions

Copy link
Copy Markdown
Contributor

This PR has been marked as stale because it has been open for 14 days with no activity. Please comment or remove the stale label if you wish to keep it active, otherwise it will be closed in 7 days

@github-actions github-actions Bot added the stale This PR is stale and will be auto-closed soon label Jun 16, 2026
Signed-off-by: Robert Kruszewski <github@robertk.io>
@robert3005
robert3005 requested a review from a team June 19, 2026 11:58
@robert3005 robert3005 removed the stale This PR is stale and will be auto-closed soon label Jun 19, 2026
@robert3005

Copy link
Copy Markdown
Contributor Author

done in #8515

@robert3005 robert3005 closed this Jun 20, 2026
@robert3005
robert3005 deleted the rk/fuzzer branch June 20, 2026 08:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/fix A bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants